// components/shareBtn/index.js
Component({
	/**
	 * 组件的属性列表
	 */
	properties: {
		info:String

	},
	attached() {
		this.setData({
      nickName: wx.getStorageSync('nickName') || '',
      avatarUrl: wx.getStorageSync('avatarUrl') || ''
    })
	},

	/**
	 * 组件的初始数据
	 */
	data: {
		nickName:'',
    avatarUrl:'',
    // 是否显示分享海报
    isCanDraw:false
	},
	/**
	 * 组件的方法列表
	 */
	methods: {
		// 获取用户信息
		getUserInfo(e) {
			this.setData({
				nickName: e.detail.userInfo.nickName,
				avatarUrl: e.detail.userInfo.avatarUrl
			})
			wx.setStorageSync('avatarUrl', e.detail.userInfo.avatarUrl)
			wx.setStorageSync('nickName', e.detail.userInfo.nickName)
		},
		createShareImage() {
			this.setData({
				isCanDraw: !this.data.isCanDraw
			})
		},
		
	}
})
